package cn.edu.fzu.delivery.domain.enums;

/**
 * 网点申请状态
 * @author yifan
 * @date 2022/11/12
 */
public enum NetworkApplyStatusEnum implements SpringConvertibleEnum{

    FAILED(-1, "不通过"),

    REVIEWING(0, "审核中"),

    PASSED(1, "已通过");

    private final int    value;

    //描述
    private final String desc;


    NetworkApplyStatusEnum(int value, String desc) {
        this.value = value;
        this.desc = desc;
    }


    @Override
    public int getValue() {
        return value;
    }


    public String getDesc() {
        return desc;
    }

    public static NetworkApplyStatusEnum parse(int value) {
        switch (value) {
            case -1:
                return FAILED;
            case 0:
                return REVIEWING;
            case 1:
                return PASSED;
            default:
                return null;
        }
    }

    @Override
    public String toString() {
        return String.valueOf(getValue());
    }
}
